<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>Ext.state.Manager</title>
        <link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
        <link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
        <link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
        <!-- GC -->
    </head>
    <body>
            <div class="body-wrap">
        <div class="top-tools">
        	<img src="../resources/print.gif" width="16" height="16" align="absmiddle">&nbsp;<a href="Ext.state.Manager.html" target="_blank">Print Friendly</a><br/>

        </div>
        <h1>Class Ext.state.Manager</h1>
        <table cellspacing="0">
            <tr><td class="label">Package:</td><td>Ext.state</td></tr>
            <tr><td class="label">Class:</td><td>Manager</td></tr>
                        <tr><td class="label">Extends:</td><td>Object</td></tr>
                                    <tr><td class="label">Defined In:</td><td><a href="State.jss.html">State.js</a></td></tr>
        </table>
        <div class="description">
            This is the global state manager. By default all components that are "state aware" check this class
for state information if you don't pass them a custom state provider. In order for this class
to be useful, it must be initialized with a provider when your application initializes.
 <pre><code><i>// <b>in</b> your initialization <b>function</b></i>
init : <b>function</b>(){
   Ext.state.Manager.setProvider(<b>new</b> Ext.state.CookieProvider());
   ...
   <i>// supposed you have a <a ext:cls=<em>"Ext.BorderLayout"</em> href=<em>"Ext.BorderLayout.html"</em>>Ext.BorderLayout</a></i>
   <b>var</b> layout = <b>new</b> Ext.BorderLayout(...);
   layout.restoreState();
   <i>// or a {Ext.BasicDialog}</i>
   <b>var</b> dialog = <b>new</b> Ext.BasicDialog(...);
   dialog.restoreState();</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i>        </div>
        <br />
        	<a href="#properties">Properties</a>
			&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#methods">Methods</a>
			&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#events">Events</a>
        	        <hr />
        <a name="properties"></a>
        <h2>Public Properties</h2>
        <div class="no-members">This class has no public properties.</div>        <a name="methods"></a>
        <h2>Public Methods</h2>
                <table cellspacing="0" class="member-table">
            <tr>
                <th class="sig-header" colspan="2">Method</th>
                <th class="msource-header">Defined By</th>
            </tr>
                <tr class="">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#clear">clear</a>(&nbsp;<code>String name</code>&nbsp;) : void</td>
        <td class="msource" rowspan="2">Manager</td>
    </tr>
    <tr class="">
        <td class="mdesc">Clears a value from the state</td>
    </tr>
        <tr class=" alt">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#get">get</a>(&nbsp;<code>String name</code>, <code>Mixed defaultValue</code>&nbsp;) : Mixed</td>
        <td class="msource" rowspan="2">Manager</td>
    </tr>
    <tr class=" alt">
        <td class="mdesc">Returns the current value for a key</td>
    </tr>
        <tr class="">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#getProvider">getProvider</a>() : Provider</td>
        <td class="msource" rowspan="2">Manager</td>
    </tr>
    <tr class="">
        <td class="mdesc">Gets the currently configured state provider</td>
    </tr>
        <tr class=" alt">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#set">set</a>(&nbsp;<code>String name</code>, <code>Mixed value</code>&nbsp;) : void</td>
        <td class="msource" rowspan="2">Manager</td>
    </tr>
    <tr class=" alt">
        <td class="mdesc">Sets the value for a key</td>
    </tr>
        <tr class="">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#setProvider">setProvider</a>(&nbsp;<code>Provider stateProvider</code>&nbsp;) : void</td>
        <td class="msource" rowspan="2">Manager</td>
    </tr>
    <tr class="">
        <td class="mdesc">Configures the default state provider for your application</td>
    </tr>
            </table>
                <a name="events"></a>
        <h2>Public Events</h2>
        <div class="no-members">This class has no public events.</div>                
        
                    <h2 class="mdetail-head">Method Details</h2>
            <div class="detail-wrap">
                            <a name="clear"></a>
                <div class="mdetail">
                <h3>clear</i></h3>
                <code>public function clear(&nbsp;<code>String name</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Clears a value from the state
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>name</code> : String<div class="sub-desc">The key name</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>void</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Manager.</div>
                </div>
                            <a name="get"></a>
                <div class="mdetail alt">
                <h3>get</i></h3>
                <code>public function get(&nbsp;<code>String name</code>, <code>Mixed defaultValue</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Returns the current value for a key
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>name</code> : String<div class="sub-desc">The key name</div></li><li><code>defaultValue</code> : Mixed<div class="sub-desc">The default value to return if the key lookup does not match</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Mixed</code><div class="sub-desc">The state data</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Manager.</div>
                </div>
                            <a name="getProvider"></a>
                <div class="mdetail">
                <h3>getProvider</i></h3>
                <code>public function getProvider()</code>
                <div class="mdetail-desc">
                    Gets the currently configured state provider
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li>None.</li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Provider</code><div class="sub-desc">The state provider</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Manager.</div>
                </div>
                            <a name="set"></a>
                <div class="mdetail alt">
                <h3>set</i></h3>
                <code>public function set(&nbsp;<code>String name</code>, <code>Mixed value</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Sets the value for a key
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>name</code> : String<div class="sub-desc">The key name</div></li><li><code>value</code> : Mixed<div class="sub-desc">The state data</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>void</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Manager.</div>
                </div>
                            <a name="setProvider"></a>
                <div class="mdetail">
                <h3>setProvider</i></h3>
                <code>public function setProvider(&nbsp;<code>Provider stateProvider</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Configures the default state provider for your application
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>stateProvider</code> : Provider<div class="sub-desc">The state provider to set</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>void</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Manager.</div>
                </div>
                        </div>
        
                
        </div>
    <hr>
    <div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright &copy; 2006-2007 Ext JS, LLC<br />All rights reserved.</div>

    </body>
</html>